1. Field of the Invention
This invention relates to a drive controller and a drive control method for a stepping motor incorporated into a paper feeding mechanism of a printer.
2. Description of the Related Art
FIG. 1 shows a paper feeding mechanism of a printer. The paper feeding mechanism includes a stepping motor 10 which can be rotated in both directions and a gear 11 rotated together with the stepping motor 10. Rotation of the gear 11 is transmitted to a gear 16 by means of an idler gear 12. Paper P is set between a feed roller 15 and a pressing roller 17 which presses the paper P against the feed roller 15, and the feed roller 15 is rotated together with the gear 16 to feed the paper P. For example, as shown in FIG. 2, the stepping motor 10 includes a plurality of excitation coils arranged to surround a rotor 10R. For brief explanation, four excitation coils A, B, C and D are shown in FIG. 2. The excitation coils A, B, C and D are excited on the basis of a two-phase excitation system, for example. In the two-phase excitation system, adjacent two of the excitation coils A, B, C and D are set into the excitation phase and excitation currents are simultaneously supplied to two excitation coils of each excitation phase. The rotor 10R rotates in a direction corresponding to the excitation order indicated as shown in FIG. 3. FIG. 3 shows a case wherein the rotor 10R is rotated from the starting position which is defined by the stepping position P0 which corresponds to the excitation phases A and B and at which the N pole thereof is initially set as shown in FIG. 2. That is, the rotor 10R is rotated in a clockwise direction when, the excitation phases are excited in an order of BC, CD, DA, AB, and so on, and is rotated in a counterclockwise direction when the excitation phases are excited in an order of DA, CD, BC, AB, and so on. The N pole of the rotor 10R is attracted towards the step position P0, P1, P2 or P3 when the excitation phase AB, BC, CD or DA is excited, respectively.
FIG. 4 shows the construction of a drive controller of the stepping motor 10 described above. The drive controller includes a control section 20 for setting the rotation amount, rotation direction, operation mode and the like of the stepping motor 10 and a motor driver 40 controlled by the motor control section 20 according to the setting data to selectively excite the excitation phases AB, BC, CD and DA of the stepping motor. The motor driver 40 includes an encoder 40A for generating 4-digit excitation phase signals allotted to the excitation coils A, B, C and D and an excitation switch 40B for selectively supplying an excitation current to the excitation coils A, B, C and D according to the excitation phase signal. The excitation phase signal is set to one of "1100", "0110", "0011" and "1001" and is used to selectively specify one of the excitation phases AB, BC, CD and DA. The encoder 40A generates the excitation phase signals in an order determined by the previously set rotation direction, by a number of times determined by the previously set rotation amount and at an interval determined by the previously set operation mode. The excitation switch 40B includes transistors T1 to T4 for selectively switching the excitation currents supplied from a power source VM to the excitation coils A, B, C and D. The transistors T1, T2, T3 and T4 are respectively turned on when the first, second, third and fourth digits of the excitation phase signal are "1" and respectively turned off when the first to fourth digits thereof are "0".
The stepping motor 10 has operation modes including a stepping mode in which it stops rotation for each increment of one step angle so as to be intermittently rotated and a slewing mode in which it is continuously rotated without being stopped for each increment of one step angle. The slewing mode is set when it is necessary to feed paper by a long distance in a short period of time, for example. In this case, the excitation interval is so controlled that the rotation speed of the stepping motor 10 will vary according to a pattern shown in FIG. 5. That is, the stepping motor 10 is accelerated from a stepping speed at which it can be stopped for each increment of one step angle to a desired speed, rotated at the desired speed, then decelerated to the stepping speed, and stopped.
The excitation interval must be set within a range in which the driver 40 can be electrically operated, but it can be set extremely short since the driver 40 does not effect the mechanical operation. However, in the stepping motor 10, the mechanical properties such as inertia and stepping angle are the main factors for determining the motor speed. The motor speed limits the range of the excitation interval when the rotation speed of the stepping motor 10 is changed. When the excitation interval exceeds the preset range, the rotor 10R cannot follow the switching of the excitation phases. Therefore, when the excitation interval is changed in the slewing mode, the amount of variation in the excitation interval is set so as to permit the rotor 10R to follow the switching of the excitation phases and attain the maximum acceleration.
The above-described conventional drive controller has a problem that an erroneous operation occurs when paper which has been printed is removed by manually rotating the feed roller 15. Assume now that the rotor 10R of the stepping motor 10 is set in the angular position P0 at the end of the printing operation. In this condition, if the feed roller 15 is manually rotated, the rotation of the roller may be transmitted to the rotor 10R of the stepping motor 10 to set the rotor 10R to a position such as a position PX which is deviated from the angular position P0. If the position of the rotor 10R is thus deviated, the stepping motor 10 cannot be operated in the slewing mode. That is, the drive controller is designed to drive the stepping motor 10 while determining a position corresponding to the excitation phase lastly excited in the preceding printing operation as the starting position before the paper is fed to make ready for the next printing operation. Therefore, the excitation phases BC, CD, DA, AB, and so on are sequentially excited at an interval according to the above-described speed changing pattern. The rotor 10R cannot follow the switching of the excitation phases, causing the stepping motor to be stepped out.